﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;

namespace Tradex {

    /// <summary>
    /// An IDataSeries represents a data series of type T elements.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IDataSeries<T> : INotifyCollectionChanged where T : new() {

        /// <summary>
        /// Gets or sets an element in the DataSeries.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        T this[int index] { get; set; }

        /// <summary>
        /// Gets the count of elements.
        /// </summary>
        int Count { get; }

        /// <summary>
        /// Adds an empty element at the front.
        /// </summary>
        void AddEntry();

        /// <summary>
        /// Adds an element of type T at the front.
        /// </summary>
        /// <param name="entry"></param>
        void AddEntry(T entry);

    }

}
